home *** CD-ROM | disk | FTP | other *** search
Text File | 1985-08-11 | 14.6 KB | 518 lines | [TEXT/Anon] |
-
- MAC.68K
-
-
-
-
-
-
- IF
- IF
- IF
-
-
-
-
-
- PURPOSE To conditionally assemble or skip source lines based
-
-
- on an attribute test.
-
-
-
-
-
- FORMAT IF attribute,expression
-
-
- IF -attribute,expression
-
-
- ifname IF attribute,expression
-
-
- ifname IF -attribute,expression
-
-
- IF attribute,expression,lcnt
-
-
- IF -attribute,expression,lcnt
-
-
- ifname IF attribute,expression,lcnt
-
-
- ifname IF -attribute,expression,lcnt
-
-
-
- attribute TRUE if
-
-
-
- DEF All symbols in expression are defined.
-
-
- AREG Expression is an address register direct.
-
-
- DREG Expression is a data register direct.
-
-
- IREG Expression is an indirect register reference.
-
-
- ABS Expression is an absolute memory reference.
-
-
- PREL Expression is a program relative reference.
-
-
- SREG Expression is a status register.
-
-
- IMMD Expression is immediate data.
-
-
-
-
-
- DESCRIPTION IF tests an expression for an attribute and begins
-
-
- assembling the IF block if the test is true, or begins
-
-
- skipping if the test is not true. By using a - prefix
-
-
- on the attribute type, the effect of the test is
-
-
- reversed.
-
-
-
- The IF block is either bounded by ELSE/ENDC pseudo
-
-
- op codes, or is a specified line count in length. If
-
-
- the line count parameter lcnt is used, the following
-
-
- source lines are skipped until either the count is
-
-
- exhausted, or until an unnamed ELSE or a named ELSE
-
-
- with a matching ifname is found. If a count is not
-
-
- specified, the IF block is terminated by an unnamed
-
-
- ENDC or a matching named ENDC. Within the block the
-
-
- effects of the test may be reversed by an unnamed ELSE
-
-
- or an ELSE with a matching ifname.
-
-
-
- By using named IF blocks, a virtually unlimited
-
-
- amount of conditional nesting may occur.
-
-
-
-
-
-
-
-
-
- -37- MAC.68K
-
-
-
- MAC.68K
-
-
-
-
-
- IFS / IFC
- IFS / IFC
- IFS / IFC
-
-
-
-
- PURPOSE To conditionally skip or assemble source lines based
-
-
- on string comparisons.
-
-
-
-
- FORMAT IFS comparision,dstring1dstring2d
-
-
- IFS comparision,dstring1dstring2d,lcnt
-
-
- ifname IFS comparision,dstring1dstring2d
-
-
- ifname IFS comparision,dstring1dstring2d,lcnt
-
-
-
- comparison EQ NE GE GT LE LT
-
-
-
- d String delimiter character. Any character
-
-
- not occuring in string 1 or in string 2
-
-
- except for & or ".
-
-
-
- string Character strings to compare
-
-
-
- lcnt Optional source line skip count
-
-
-
-
- DESCRIPTION IFS compares two strings and begins assembly if the
-
-
- comparison is true, or begins skipping source lines if
-
-
- the comparison is false. The comparison is done left
-
-
- to right until the condition is found false or the
-
-
- strings are exhausted. A short string is logically
-
-
- padded with null characters.
-
-
-
- The IF block is either bounded by ELSE/ENDC pseudo
-
-
- op codes, or is a specified line count in length. If
-
-
- the line count parameter lcnt is used, the following
-
-
- source lines are skipped until either the count is
-
-
- exhausted, or until an unnamed ELSE or a named ELSE
-
-
- with a matching ifname is found. If a count is not
-
-
- specified, the IF block is terminated by an unnamed
-
-
- ENDC or a matching named ENDC. Within the block the
-
-
- effects of the test may be reversed by an unnamed ELSE
-
-
- or an ELSE with a matching ifname.
-
-
-
- By using named IF blocks, a virtually unlimited
-
-
- amount of conditional nesting may occur.
-
-
-
- The pseudo ops IFC and IFNC are recognized and
-
-
- processed as the equivalent IFS pseudo ops. Their
-
-
- format is the same as described by AS68.
-
-
-
- EXAMPLE RETURN MACRO ADDR
-
-
- IFS EQ,*ADDR** TEST FOR NULL PARAMETER
-
-
- RTS
-
-
- ELSE
-
-
- BRA ADDR
-
-
- ENDC
-
-
- ENDM
-
-
-
-
-
- MAC.68K -38-
-
-
-
- MAC.68K
-
-
-
-
-
- IFxx
- IFxx
- IFxx
-
-
-
-
-
- PURPOSE To conditionally assemble or skip source lines based
-
-
- on a comparison of two expressions.
-
-
-
-
-
- FORMAT IFxx expression1
-
-
- IFxx expression1,expression2
-
-
- IFxx expression1,expression2,lcnt
-
-
- ifname IFxx expression1,expression2
-
-
- ifname IFxx expression1,expression2,lcnt
-
-
-
- xx EQ NE GE GT LE LT
-
-
-
- lcnt Optional source line skip count.
-
-
-
-
-
- DESCRIPTION IFxx compares two expressions and begins assembly
-
-
- if the xx condition is true, or begins skipping if the
-
-
- xx condition is false. If expression2 is not present,
-
-
- expression1 is compared to zero. Any symbols used in
-
-
- the expressions must be previously defined.
-
-
-
- The IF block is either bounded by ELSE/ENDC pseudo
-
-
- op codes, or is a specified line count in length. If
-
-
- the line count parameter lcnt is used, the following
-
-
- source lines are skipped or assembled until either the
-
-
- count is exhausted, or until an unnamed ELSE or a
-
-
- named ELSE with a matching ifname is found. If a
-
-
- count is not specified, the IF block is terminated by
-
-
- an unnamed ENDC or a matching named ENDC. Within the
-
-
- block the effects of the test may be reversed by an
-
-
- unnamed ELSE or an ELSE with a matching ifname.
-
-
-
- By using named IF blocks, a virtually unlimited
-
-
- amount of conditional nesting may occur.
-
-
-
-
-
- EXAMPLES IFGT PAGSIZE,24
-
-
- BSR ADVANP
-
-
- ELSE
-
-
- BSR ADVANL
-
-
- FOO IFLE BAZ,BAZLIMIT,3
-
-
- BSR SETBAZ
-
-
- FOO ENDC
-
-
- ENDC
-
-
-
-
-
-
-
-
-
- -39- MAC.68K
-
-
-
- MAC.68K
-
-
-
-
-
- INCLUDE
- INCLUDE
- INCLUDE
-
-
-
-
-
- PURPOSE To insert text from another file into the assembly.
-
-
-
-
-
- FORMAT INCLUDE filename
-
-
-
-
-
- DESCRIPTION INCLUDE reads in all the text from the specified
-
-
- file name and MAC.68K then assembles that text before
-
-
- resuming assembly with the next line of input. INCLUDE
-
-
- may be nested to 5 levels.
-
-
-
- MAC.68K uses a default extension of blanks.
-
-
-
-
-
- EXAMPLES INCLUDE IODECKS.TXT
-
-
- INCLUDE B:IODECKS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MAC.68K -40-
-
-
-
- MAC.68K
-
-
-
-
-
- INCLUDEH
- INCLUDEH
- INCLUDEH
-
-
-
-
-
- PURPOSE To load a previously assembled object module.
-
-
-
-
-
- FORMAT INCLUDEH filename
-
-
-
-
-
- DESCRIPTION INCLUDEH reads in a previously assembled .MOD
-
-
- file. MAC.68K adds the current value of the location
-
-
- counter to any entry point symbol values from the .MOD
-
-
- file and enters the symbol names in the symbol table.
-
-
- MAC.68K then inserts the object code from the .MOD
-
-
- file at the current origin counter and advances the
-
-
- origin and location counters by the length of the
-
-
- object code.
-
-
-
- MAC.68K uses a default extension of .MOD.
-
-
-
-
-
- EXAMPLE INCLUDEH RUNIO
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -41- MAC.68K
-
-
-
- MAC.68K
-
-
-
-
-
- INCLUDES
- INCLUDES
- INCLUDES
-
-
-
-
-
- PURPOSE To load a previously assembled set of symbols and macro
-
-
- definitions.
-
-
-
-
-
- FORMAT INCLUDES filename
-
-
- INCLUDES filename,symbol,symbol,...symbol
-
-
-
-
-
- DESCRIPTION INCLUDES is an initialization directive. It must
-
-
- appear after the IDENT card but before any
-
-
- non-initialization operation codes.
-
-
-
- INCLUDES reads a previously assembled .STX file
-
-
- and enters the symbols and macros from the .STX file
-
-
- into the current symbol and macro tables. A maximum
-
-
- of three INCLUDES may be used in one assembly. In the
-
-
- case of duplicate symbol or macro definitions, the
-
-
- first one encountered is used.
-
-
-
- MAC.68K uses a default extension of .STX .
-
-
-
- A list of symbol names that are NOT to be defined
-
-
- may appear after the filename. This allows the program
-
-
- to define its own values for those symbols.
-
-
-
-
-
- EXAMPLES INCLUDES CPMTEXT
-
-
- INCLUDES CPMTEXT,FCBL
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MAC.68K -42-
-
-
-
- MAC.68K
-
-
-
-
-
- LIST
- LIST
- LIST
-
-
-
-
-
- PURPOSE To select which lines are written to the list file.
-
-
-
-
-
- FORMAT LIST option1,option2,...optionN
-
-
-
- Default Option Line type controlled by option
-
-
-
- - A Image prior to concatenation and string
-
-
- substitution.
-
-
- - C Op codes: PAGE SPACE TITLE and SUBTTL.
-
-
- - D DUPlicated lines.
-
-
- - E DEFERed lines.
-
-
- - F IF skipped lines.
-
-
- - G M68000 instructions and data op codes.
-
-
- Overrides LIST options M and S.
-
-
- - I Included text lines.
-
-
- + L All source lines.
-
-
- - M User macro expansions.
-
-
- - S System macro expansions.
-
-
- $ All options.
-
-
- * Reinstate options in effect prior to
-
-
- previous LIST.
-
-
-
-
-
- DESCRIPTION LIST options are a single character or a single
-
-
- character prefixed by a -. Multiple options separated
-
-
- by commas may be used, and are scanned from left to
-
-
- right. A single character enables the option and the -
-
-
- prefix disables the option.
-
-
-
- Line types are inclusive in nature and all LIST
-
-
- options that apply must be selected before a source
-
-
- line is listed. For example, to list an IF skipped
-
-
- line within a user macro called in an included text
-
-
- file requires options L,I,M,F to be enabled.
-
-
-
- The prior list option is remembered and may be
-
-
- restored by using LIST *. LIST -$ will turn off all
-
-
- options. LIST G is useful for listing macro
-
-
- expansions.
-
-
-
-
-
- EXAMPLES LIST -L
-
-
- LIST L,F,-M
-
-
- LIST *
-
-
-
-
-
-
-
-
- -43- MAC.68K
-
-
-
- MAC.68K
-
-
-
-
-
- LOC
- LOC
- LOC
-
-
-
-
-
- PURPOSE To set the current location counter.
-
-
-
-
-
- FORMAT LOC expression
-
-
-
-
-
- DESCRIPTION The location counter is used to assign address
-
-
- values to location field symbols on M68000
-
-
- instructions and data pseudo ops. It may be set
-
-
- independent of the origin counter.
-
-
-
- By default the location counter equals the origin
-
-
- counter, and a new ORG will also automatically reset
-
-
- the LOC counter. Caution is advised when changing the
-
-
- LOC because code generated with mismatching ORG and
-
-
- LOC values probably will not execute properly.
-
-
-
- All symbols used in the expression to generate the
-
-
- new LOC value must be previously defined.
-
-
-
- The current value of the location counter may be
-
-
- referenced by using the special symbols * or *L.
-
-
-
- Often used to assemble blocks of code to be moved
-
-
- at execution time from the ORGed address to the LOCed
-
-
- address. Also used for assembly of table definitions
-
-
- containing relative addresses (see also OFFSET).
-
-
-
-
-
- EXAMPLES LOC $FF0000
-
-
- LOC *O Reset LOC to current origin address
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MAC.68K -44-
-
-
- eset LOC to current origin address
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MAC.68K